//管理APP所有权限
1 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; |
//tableview取消选中(点击方法中添加此方法)
1 | [self performSelector:@selector(deselect) withObject:nil afterDelay:0.25f]; |
//取消选中
1 | - (void)deselect |
//使用系统的复制粘贴功能
1 | [UIPasteboard generalPasteboard].string = @"你的字符串"; |
//修改系统相册界面为中文
1 | 在 Info.plist 文件中添加 Localizations 键值 内容为item 值为Chinese (simplified) |
//默认返回按钮去掉文字(此方法遇到特殊情况不好用,最好在界面跳转前重新定义backBarButtonItem)
1 | [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault]; |
//禁止tableview滑动
1 | self.tableview.scrollEnabled = NO; |
//隐藏导航栏
1 | [self.navigationController.navigationBar setBackgroundImage:[UIImage new] |
//父视图透明子视图不透明
1 | btn.backgroundColor = [[UIColor colorWithWhite:0.5 alpha:1] colorWithAlphaComponent:0.1]; |
//tableview改变头部视图背景颜色与字体颜色
1 | #pragma mark 改变头部视图 |
//开启照明
1 | - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ |
//UITableView 的 headerView跟随 cell一起滚动
1 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { |
获取APP的图标 icon
1 | NSDictionary *infoPlist = [[NSBundle mainBundle] infoDictionary]; |